package com.woniuxy.service.impl;

import java.util.List;

import com.woniuxy.DTO.AlgsFeedingRecordDTO;
import com.woniuxy.vo.AlgsFeedingRecirdVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.woniuxy.mapper.AlgsFeedingRecordMapper;
import com.woniuxy.domain.AlgsFeedingRecord;
import com.woniuxy.service.IAlgsFeedingRecordService;

/**
 * 饲养记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-15
 */
@Service
public class AlgsFeedingRecordServiceImpl implements IAlgsFeedingRecordService 
{
    @Autowired
    private AlgsFeedingRecordMapper algsFeedingRecordMapper;

    /**
     * 查询饲养记录
     * 
     * @param feedingRecordId 饲养记录主键
     * @return 饲养记录
     */
    @Override
    public AlgsFeedingRecord selectAlgsFeedingRecordByFeedingRecordId(Long feedingRecordId)
    {
        return algsFeedingRecordMapper.selectAlgsFeedingRecordByFeedingRecordId(feedingRecordId);
    }

    /**
     * 查询饲养记录列表
     * 
     * @param algsFeedingRecord 饲养记录
     * @return 饲养记录
     */
    @Override
    public List<AlgsFeedingRecord> selectAlgsFeedingRecordList(AlgsFeedingRecord algsFeedingRecord)
    {
        return algsFeedingRecordMapper.selectAlgsFeedingRecordList(algsFeedingRecord);
    }

    /**
     * 新增饲养记录
     * 
     * @param algsFeedingRecord 饲养记录
     * @return 结果
     */
    @Override
    public int insertAlgsFeedingRecord(AlgsFeedingRecord algsFeedingRecord)
    {
        return algsFeedingRecordMapper.insertAlgsFeedingRecord(algsFeedingRecord);
    }

    /**
     * 修改饲养记录
     * 
     * @param algsFeedingRecord 饲养记录
     * @return 结果
     */
    @Override
    public int updateAlgsFeedingRecord(AlgsFeedingRecord algsFeedingRecord)
    {
        return algsFeedingRecordMapper.updateAlgsFeedingRecord(algsFeedingRecord);
    }

    /**
     * 批量删除饲养记录
     * 
     * @param feedingRecordIds 需要删除的饲养记录主键
     * @return 结果
     */
    @Override
    public int deleteAlgsFeedingRecordByFeedingRecordIds(Long[] feedingRecordIds)
    {
        return algsFeedingRecordMapper.deleteAlgsFeedingRecordByFeedingRecordIds(feedingRecordIds);
    }

    /**
     * 删除饲养记录信息
     * 
     * @param feedingRecordId 饲养记录主键
     * @return 结果
     */
    @Override
    public int deleteAlgsFeedingRecordByFeedingRecordId(Long feedingRecordId)
    {
        return algsFeedingRecordMapper.deleteAlgsFeedingRecordByFeedingRecordId(feedingRecordId);
    }

    @Override
    public List<AlgsFeedingRecirdVO> queryAlgsFeedingRecordAndTypeMsgAndStaffName(AlgsFeedingRecordDTO algsFeedingRecordDTO) {
        return algsFeedingRecordMapper.queryAlgsFeedingRecordAndTypeMsgAndStaffName(algsFeedingRecordDTO);
    }

    @Override
    public List<AlgsFeedingRecirdVO> queryAlgsFeedingRecordAndTypeMsgAndStaffNameManger(AlgsFeedingRecordDTO algsFeedingRecordDTO) {
        return algsFeedingRecordMapper.queryAlgsFeedingRecordAndTypeMsgAndStaffNameManger(algsFeedingRecordDTO);
    }
}
